function LuaMain()
    CreatUpdateUI();

end

UI_update=
{
    Text=nil,
    Text2=nil,
    Button=nil,
    Button2=nil,

}
CreatUpdateUI=function()
local ab=self:Lua_GetBundle("ui","update",isCopy);
updateUI = CS.UnityEngine.Object.Instantiate(ab:LoadAsset("update").gameObject).gameObject;
self.objectManager:AddModularGameObject("update",updateUI);
updateUI.transform:SetParent(Canvas.transform);
local updateUITransform=updateUI:GetComponent("RectTransform");
updateUITransform.localScale=CS.UnityEngine.Vector3.one;
updateUITransform.sizeDelta=CS.UnityEngine.Vector2(0,0);
updateUITransform.localPosition=CS.UnityEngine.Vector3.zero;  
updateUI:SetActive(false);

UI_update.Text=self.objectManager:fandGameobject("update","Image","Text");
UI_update.Text2=self.objectManager:fandGameobject("update","Image","Text2");
UI_update.Button=self.objectManager:fandGameobject("update","Image","Button");
UI_update.Button2=self.objectManager:fandGameobject("update","Image","Button2");
end

function SetUPdateui(text1,text2,Active,ActiveButton)

    updateUI:SetActive(Active);
    UI_update.Button:SetActive(ActiveButton);
    UI_update.Button2:SetActive(ActiveButton);
    UI_update.Text:GetComponent("Text").text=text1;
    UI_update.Text2:GetComponent("Text").text=text2;
    UI_update.Button2:GetComponent("Button").onClick:AddListener(
        function() 
            UI_update.Button2:SetActive(false);
            UI_update.Button:SetActive(false);
            self:Lua_StartUpdate();
        end);
    UI_update.Button:GetComponent("Button").onClick:AddListener(
        function() 
            updateUI:SetActive(false);
        end);
end